﻿<html>
<body>
    <h1>Summary</h1>
    <p>Tooltips are notoriously difficult to handle in WoW UI code, as the interaction of GameTooltip methods can be quite complicated.
       The default Blizzard interface code (FrameXML) defines a GameTooltip object called GameTooltip (confusing, eh). This is used as the game's main tooltip. It consists of a number of lines(max 30); 
       to determine how many there are, you can call the GameTooltip:NumLines() function.</p>
    <br />
    
    <h1>Functions</h1>
    <h2>SetOwner</h2>
    <p>Moves the game tooltip to a location based on the "owner" frame.</p>
    <p>Syntax: GameTooltip:SetOwner(owner, "anchor"[, +x, +y]);</p>
    <p>|cffee4400owner|r</p>
    <p>Frame - Owner frame, which defines the element where the tooltip is centered on. A pointer to the frame is required, not the frame name itself (use getglobal() to get the pointer from the frame name).</p>
    <p>|cffee4400anchor|r</p>
    <p>String - a string that describes the anchor point as it would be set via the SetPoint() function. Anchoring methods as follows:
    ANCHOR_TOPRIGHT,
    ANCHOR_RIGHT,
    ANCHOR_BOTTOMRIGHT,
    ANCHOR_TOPLEFT,
    ANCHOR_LEFT,
    ANCHOR_BOTTOMLEFT,
    ANCHOR_CURSOR,
    ANCHOR_PRESERVE,
    ANCHOR_NONE.</p>
    <br />
    
    <h2>SetText</h2>
    <p>Sets the text of the tooltip.</p>
    <p>Syntax: GameTooltip:SetText("text" [, r, g, b, alphaValue, textWrap])</p>
    <p>|cffee4400"text" |r</p>
    <p>String - The text of the new tooltip. Variable can be used inplace of a string.</p>
    <p>|cffee4400"r"|r</p>
    <p>Optional - range 0 to 1 - red color value for text string.</p>
    <p>|cffee4400"g"|r</p>
    <p>Optional - range 0 to 1 - green color value for text string.</p>
    <p>|cffee4400"b"|r</p>
    <p>Optional - range 0 to 1 - blue color value for text string </p>
    <p>|cffee4400"alphaValue " |r</p>
    <p>Optional - Range - 0 to 1 specifies the transparency of the text. 0=transparent 1=Opaque, default 1.</p>
    <p>|cffee4400"textWrap " |r</p>
    <p>Optional - Boolean specifying whether to wrap the text string to fit the tooltip box. 1 = Wrap, 0 = Don't wrap. Default: 0.</p>
    <br />
    
    <h2>Hide</h2>
    <p>Hides the tooltip.</p>
    <br />
    
    <h1>Example</h1>
    <p>Move the cursor over the picture and the tooltip will appear. This is a button with a texture.
        The OnEnter and OnLeave events are used.</p>
    <br />
    <br />
    <br />   
    <br />   
</body>
</html>
